package com.ytjj.qmyx.admin.controller;

import com.ytjj.common.api.CommonResult;
import com.ytjj.qmyx.admin.model.request.PayStatisticsRequest;
import com.ytjj.qmyx.admin.service.StatisticsService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;


/**
 * @Description 统计
 * @ClassName StatisticsController
 *
 *
 * @Version 1.0
 **/

@RestController
@RequestMapping("/statistics")
public class StatisticsController {

    @Resource
    private StatisticsService statisticsService;

    /*@Resource
    private DataClient dataClient;*/

    /**
     * @Description 获取支付统计列表
     *
     *
     *
     * @Version 1.0
     **/
    @PostMapping("/getPayStatisticsList")
    public CommonResult getPayStatisticsList(@RequestBody PayStatisticsRequest payStatisticsRequest) {
        return CommonResult.success(statisticsService.getPayStatisticsList(payStatisticsRequest));
    }

    /**
     * 页面统计
     */
    /*@GetMapping("/getPageStatistics")
    public CommonResult getPageStatistics(@RequestParam(required = false) String platform,
                                          @RequestParam Integer timeType,
                                          @RequestParam(required = false) String channel) {
        return dataClient.getPageStatistics(platform,timeType,channel);
    }

    *//**
     * 获取路径配置
     *
     * @return
     *//*
    @GetMapping("/getPathConfig")
    public CommonResult getPathConfig() {
        return dataClient.getPathConfig();
    }


    @GetMapping("/getPageStatisticsList")
    public CommonResult getPageStatisticsList(@RequestParam(required = false) String platform,
                                              @RequestParam(required = false) String code,
                                              @RequestParam(required = false) String channel,
                                              @RequestParam Integer timeType) {
        return dataClient.getPageStatisticsList(platform, code, channel, timeType);
    }*/
}
